Title: SQL W3S (By-BKK) / 103 Backup DB
Tags: Obsidian_to_Anki

Q: What does the SQL BACKUP DATABASE statement do?
A: It creates a full backup of an existing SQL database (SQL Server).

Q: Which SQL command is used to back up a database in SQL Server?
A: BACKUP DATABASE

Q: What is the syntax for creating a full backup in SQL Server?
A: BACKUP DATABASE databasename TO DISK = 'filepath';

Q: True or False: The BACKUP DATABASE statement can be used in all database systems.
A: False (It is specific to SQL Server)

Q: How do you perform a differential backup in SQL Server?
A: Use BACKUP DATABASE databasename TO DISK = 'filepath' WITH DIFFERENTIAL;

Q: What does a differential backup include?
A: Only the parts of the database changed since the last full backup

Q: True or False: A differential backup takes more time than a full backup.
A: False (It usually takes less time since only changes are backed up)

Q: Give an example of a SQL command to backup database 'testDB' to D drive.
A: BACKUP DATABASE testDB TO DISK = 'D:\backups\testDB.bak';

Q: How can you reduce backup time in SQL Server?
A: By using a differential backup

Q: True or False: You should back up the database on the same drive where the actual database resides.
A: False (Use a different drive to avoid data loss during a disk crash)

Q: Which SQL statement creates a full backup of a database named 'myDB'?
A: BACKUP DATABASE myDB TO DISK = 'C:\backups\myDB.bak';

Q: 'BACKUP DATABASE' is used in SQL Server to create backups. What is its typical syntax?
A: BACKUP DATABASE databasename TO DISK = 'filepath';

Q: Answer first: Only changed parts since the last full backup are backed up.
A: What does a differential backup contain?

Q: Answer first: BACKUP DATABASE myDB TO DISK = 'C:\backups\myDB.bak;'
A: Which SQL statement creates a full backup of a database named 'myDB'?